package main


import (
    "fmt"
)


func main(){
    // map的创建
    m := map[string]string {
        "name": "ccmouse",
        "course": "golang",
        "site": "imooc",
        "quality": "notbad",
    }

    m2 := make(map[string]int)
    var m3 map[string]int
    fmt.Println(m, m2, m3)
    fmt.Println()


    fmt.Println("Traversing map")
    for k, _ := range m{
        fmt.Println(k)
    }


    fmt.Println("Getting values")
    courseName := m["course"]

    
    fmt.Println(courseName)
    causeName := m["cause"]
    fmt.Println(causeName)


    fmt.Println("Deleting values")
    delete(m, "name")
    for k, _ := range m{
        fmt.Println(k)
    }
}

